<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>
    var str = "hello";

    console.log(str);
    console.log(str[0]);
    console.log(str[1]);
    console.log(str[2]);
    console.log(str.length);

    str[1] = "啊";

    str.length = 1;

    console.log(str[4]);
    str[5] = "哈";
    console.log(str[5]);

    for(var i=0;i<str.length;i++){
        console.log(str[i]);
    }

    // str = "world"


    console.log(str);

</script>
</html>